// index.js
// 获取应用实例
const app = getApp()

Page({
    data: {
        imgUrls: [
            'https://images.unsplash.com/photo-1551334787-21e6bd3ab135?w=375',
            'https://images.unsplash.com/photo-1551214012-84f95e060dee?w=375',
            'https://images.unsplash.com/photo-1551446591-142875a901a1?w=375'
        ],
        indicatorDots: true,
        indicatorColor: 'rgba(255, 255, 255, .4)',
        indicatorActColor: '#ffffff',
        vertical: false,
        autoplay: false,
        circular: false, 
    },
    // 事件处理函数
    bindViewTap: function() {
        
    },
    onLoad: function() {
        
    },

    // 扫描
    ScanCode() {
        wx.scanCode({
            success(res) {
                console.log(res) 
                wx.showModal({
                    title: '二维码链接',
                    content: res.result,
                    success: function(res) {
                        if (res.confirm) {
                        console.log('用户点击确定')
                        } 
                        else if (res.cancel) {
                        console.log('用户点击取消')
                        }
                    }
                }) 
            }
        })
    },

    GoToRecord() {
        wx.redirectTo({
            url: '../recordList/recordList'
        }) 
    }
})